Revert "Complete removal of OAuth2"

This reverts commit 45862425178b8c43a4076096f6a519e09c949db0.