This goes back to cross-domain cookies. If the browser is on the page a
, it will only save and send cookies for the domain a
. The server cannot set cookies for other domains nor will it get cookies for other domains from the browser. The same is true for domain b
, in reverse.
Two different domains are two different domains. Even if they harbour the same content, the browser doesn't know that. To the browser it's two different domains and they can't share the same login cookie.