DrupalCon Baltimore: 161 sessions, many voices, infinite possibilities. Earlybird rate ends Friday.
For a few sites where we're using a custom module that we've integrated into masquerade we've often ran into an issue with when you switch back from a user you end up on the page you clicked switch back on, which you may or may not have access to. For instance you switched to a user with permission for changing the theme from one without that permission, and on the theme settings page you click switch back and get greeted by a nice access denied message.
I'd propose we should be able to pass a 'return' url to the switch page, which stores the url and when you switch back it calls drupal_goto on that url instead of the referrer if its set.