modeling ourselves after github which supports oauth 2