Implemented most parts of "login to continue" functionality, using
session to store original request data.