refactoring, login view