Adding support for Stormpath REST API requests redirection.

The support that was added works for any request to the Stormpath REST API that returns a redirection response, although the fix was motivated by the 'current tenant' redirection issue.