another option, if you wanted to avoid bringing in core.async
and more involved state management, would be to store your cookie in a global atom, and just reauth it if one of your requests returns an authentication error
and then can automatically retry the request
that's what i'd probably do for simple REPL support
the state management, mechanisms for holding requests while you reauth etc would only be once you had something that needed a little more concurrency and resiliancy
very cool, thank you for the input!