Add OAuth support

Fixes #100
Merge pull request #170 from viart/bearer-support

Add OAuth support