added toggle for joining and leaving group