Missing assertion
Reworked how redirects are handled

Redirects were improperly translated from the rails library. The redirect target URL needs to be persisted through to the redirect request. This is done by storing the redirect target url in the session.

This is due to the inability of a XHR to detect redirects. You need to send the X-XHR-Redirected-To header on the response of the redirected response.