minor fixes to login process