Added tests for OAuth flow.