Fixed login in something went wrong check

moved back to if statement in function for now