def not_authenticated(response):
    response_content = decoded_response(response)
    try:
        if ((response.status_code == 401) or (json.loads(response_content)['responseCode'] == 402)):
            return True
    except ValueError as e:
        pass
    return False
def not_authenticated(response):
    response_content = decoded_response(response)
    try:
        if ((response.status_code == 401) or (json.loads(response_content)['responseCode'] == 402)):
            return True
    except ValueError as e:
        pass
    return False