Updated to support new version of oauth flow without Django dependency