Don't store XHR requests for user redirection after log-in.

In the case that users clicked 'Log in', but the last request the server received was an XHR, they would be redirected to that XHR endpoint. This was unhelpful.

This code is called on nearly every request so I'm fielding it to see if anyone is relying on this behaviour. Will merge in a couple hours otherwise.
I prefer to move this to the first 'it' because is only used in there. And two move to two different contexts: when is xhr and when is not xhr.