refactored to only set users's roles to those which are already configured and the user is a part of
creates local user accounts if not already present. refactored namespace