Refactoring LoginControllerTest.