added log calls to oauth2 flow