Additional logging and unit-test for OAuth