oAuth and configuration improvements

Improved oAuth token handling and added ability to configure SDK at
runtime, as an option to the declarative constants-based configuration.