Small changes to oauth class

Bug fixes, not important.