AGJS-239: promisefied Authorization / OAuth2 + refactored tests