Attempted fix for issue #515 where $user->language isn't set after login.