We have implemented the following solution:
After the anonymous user has selected a language, you retrieve the sessionID with a Java action. Then create an object in which you set the sessionID and set an association to the selected language. After login you retrieve the sessionID again with a Java action and retrieve the created object by sessionID. You can then retrieve the associated language through that object and set the System.User_Language. Make sure you cleanup the objects that are used for storing the sessionID.
I'm curious to hear if this is applicable to your particular situation, but it sounds like it should work.