* fix: fix logging in and out with a refresh fixes #805 * simplify code * make test less flaky * fix dumb mistake