Add OAuth logic, tests pending.