add some oauth code, work in progress