Returns the user if they are logged in and have the required role, otherwise redirects to the unauthorized page.
Optional
Returns the user if they are logged in and have the required role, otherwise redirects to the unauthorized page.