fixed bad credential handling and added exit from login screen