refactoring LoginTest