Adds OAuth authentication support

Could stand to be cleaned up a bit, but I would love to get some early feedback.