OAuth2 lib, result object and other fixes