changed the logif of the login screen