Make `add_user_to_cohort` atomic