Add two-legged oauth tests and error fix