fixes an issue where user logs out quickly before the current logins are cleared
clears logins and fixes bad error handling