I've got authentication set up on certain pages of my website, with anonymous access denied. For regular items/pages, this works like regular forms authentication as you'd expect - click a link or go to the page, you're sent to the login page with a returnUrl query string to send you back where you started after.
This doesn't appear to be the case for media items, though. If I add a link to a similarly-protected media item in a rich text editor, for example, and I click the link, I'm taken to the login page as expected, but no returnUrl property is added on.
Is this normal behavior in Sitecore, or can it be altered to provide the returnUrl for media items? This is Sitecore 8.1 Update 2, if that comes into play as a later fix.