Re-factor role assignment code.

The unsynchronize method now unassigns all users from appropriate role(s) in one go.