improved tests for login/logout