Login refactoring
Login refactoring