Refactored the code so that user role association happens when the user
is created.