Refactored TestLogin.