Login bug fix

fixed bug from login refactoring