OAuth support

Added support for OAuth.