Add oauth tests and endpoint