refactored user role method and updated corrisponding calls in views and controllers