Logout changes

also edited user checking because it wasnt working