refactored generate user and roles to be shorter