Updated the login functionality

Updated the login functionality