better debugging for logins and logouts.
Nicer tracking for token lifetime.
Merge branch 'test' into dev