The cookie will get sent automatically if you’ve logged into the Gateway by issuing a POST to /db/_session.
Also, make sure you actually need to use session-based logins. You should only need to if you’ve set up custom authentication on the server side; otherwise the default HTTP Basic auth works fine.
I do need to use the session based login because the authentication happens on server.
Is there an example where I can look to for the session based login?