Accessdenied redirect

As an anoymous user, I go to a private item that I only have access to once I'm signed in. I'm redirected to the /accessdenied page, from which I can login. Once I login, the access denied page is just refreshed instead of redirecting the user to the requested page.

In order to make this work, the original URL should be encoded into the /accessdenied URL. There should already be something in topnavigation that will pick up on this.