protected function isValid($response)
    {
        if (is_null($response)) {
            return true;
        }
        if (app('request') instanceof Request) {
            return $response->getStatusCode() !== 401;
        }
        return true;
    }