added a test for logging out and prevented already logged out users from attempting to logout again.