Implemented oauth. Closes #38.