Refactoring login view