abstracts out oauth part