Update register() to use User::hasRole()