WiP: implements OAuth both server and client side (bug 905806)

Not all tests are updated to use the new client for now.