applied latests changes from https://github.com/mlwelles/AFOAuth2Client