login controller refactoring continues