I am using Login's redirectToPrior. When a user has an error in the userid, password or recaptcha fields the Login resource is returned with the appropriate error message, but redirectToPrior is then reset to the login resource rather than the original prior URL. As a result the user receives the Login resource with a logout link (the logoutTpl) rather than the original prior URL.
I would like to retain the original prior URL until the login process is complete, regardless of whether or not there was a temporary hiccup during login.
I am sure this can be accomplished with pre/post hooks but would like some feedback regarding the best way to make it happen. Is the original prior URL available to a hook?
Thanks