Fix a first batch of problems with oauth.