addStateListener
Registers a listener that is notified whenever the authentication state changes.
The listener is invoked on a background thread; dispatch to your UI thread if you update UI in response.
Return
A Closeable that, when closed, removes the listener.
Parameters
listener
A Consumer that receives DirectAuthenticationState updates.