refactored oauth methods to an oauth class