Updated to work with upstream OAuth support