Add tests for login logout