Fixes to the user login system.