oAuth code cleanup.
Merge branch 'master' into cycle-markers