I don't often come to SuperUser, but a lot on Travel.SE, Apple,SE, and various others. Typically, if I go from XX.stackexchange.com to YY.stackexchange.com, I remain logged in. And when I open a browser for the first time after a boot or a non-SE site, I am automatically logged in. I assumed that was done by cookies.
Today, I tried to make a comment on SuperUser, and had to log in. That is not a surprise, since it is a different domain. But when I went from there to Travel.SE, I was logged out.
What is the mechanism involved here?