private function isLoggedIn(ResponseInterface $response)
    {
        if ($response->getStatusCode() != 302) {
            return true;
        }

        $location = $response->getHeader('Location');
        if (strpos($location, "/en/auth") !== false) {
            return false;
        }

        return true;
    }
private function isLoggedIn(ResponseInterface $response)
    {
        if ($response->getStatusCode() != 302) {
            return true;
        }

        $location = $response->getHeader('Location');
        if (strpos($location, "/en/auth") !== false) {
            return false;
        }

        return true;
    }
private function isLoggedIn ( ResponseInterface $ response ) { if ( $ response -> getStatusCode ( ) != 302 ) { return true ; } $ location = $ response -> getHeader ( 'Location' ) ; if ( strpos ( $ location , "/en/auth" ) !== false ) { return false ; } return true ; }
Check if the request failed because the user was not logged in

@param ResponseInterface $response
@return bool
Check if the request failed because the user was not logged in