On login screen, set email to anything that starts with `tokenlogin`, such as `tokenlogin@example.com`. Set password to token, press login. Close app, restart it, and you'll automatically get logged in with that token.
This patch relies on some stuff I added with slashcommands, so please use that patch in too.