logic to add and remove players when entering and leaving rooms