boilerplate example of using OAuth2 client auth flows and credential data retention for state control (logging in and logging out)