Cleaned up test helper
Added integration test for logout