login controller refactoring again