added oauth functionality