Trouble setting session cookie after successful REST API login in Moqui

Hello, I am using Moqui and have encountered an issue with setting the session cookie after a successful login via a REST API. When logging in through the Moqui web root, the cookie is automatically set. However, when using a REST API to log in, the cookie is not set automatically. Can you please advise on how to properly set the cookie in the response header using Axios and Moqui? Thank you for your help.

When submitting a post request you need to send back the csrf token

See resistmanagement/FindMessage.xml at c911509b5e5a1532b955af98c592814796b58bd1 · resistmanagement/resistmanagement · GitHub for an example