I'm almost certainly not much help, sorry. Heck, so I could understand the basics I needed to construct a flowchart! [github.com] ;)

Did you try checking the status of the token at the bottom of the authentication page? [docs.10centuries.org]?
//