oAuth integration

Not working. Don't merge until fixed. Kept here more for reference.