      const onLoginPage = this.locationIsLoginPage(location);

      // Unauthorized
      if (xhr.status === 401 && !onLoginPage && !onAccessDeniedPage) {
        document.cookie = CookieUtils.emptyCookieWithExpiry(new Date(1970));
        window.location.href = "#/login";
      }

      // TODO: foundation refactor needed
      // If you:
      // 1) Log in with an Identity Provider
      // 2) Have a user with access only to "/services"
      // 3) And access the root path "/"
      //