Owin middleware only redirects on status 401.
- Middleware now only redirects on 401.
- Moved tests to Middleware test class - the handler is an internal helper that shouldn't be tested.