Refactor Login view