Various OAuth updates

Miscellaneous bug fixes, re-orgs, updates.