Refactored to remove flicker when joining/leaving sessions.