stop handling a session on errors
added another test for the logout command