Refactor user and userrole