Refactor user OAuth stuff.