Got the returnTo mechanism working

The notion here is that, when I go to do something and get blocked
because I'm not logged in, the system should automatically return me
there after I log in.

This is just a first draft, and only works for invite links, but it's a
start.  It may get immediately enhanced.