Working version of 401 response and shifting the routeChangeStart logic into the Authenticate service.