extract random_id/0 to module, serialize leave/join calls