Add tests for session management