The fetch function does not send cookies by default. There are two possible ways to send cookies:
fetch('/login', { credentials: 'same-origin' })
fetch('https://otherdomain.com/login', { credentials: 'include' })