Adding OAuth support to the base API client

Work in progress. Needs testing.