Fix OAuth bug

Special thanks to Ameeta Saxena for finding this bug.