Changes to support oauth