Implemented leaving a session when switching channels.