Added unit tests for logging out