I'm using the Authorize attribute to filter controller actions based on user roles, but if an unauthorized action is attempted, the user is redirected back to the login page. As I user I would find this confusing and irritating.
How can I instead show an error message informing the user they need certain roles, and remain on the view where they attempted an action?