It happened to me a moment ago, when Chrome crashed once again.
If you want to stay logged in, just check the "Stay Logged In" button before logging in.
Because it isn't random, as you usually define your section time while logging in, in SMF.
But it's still a very good possibillity, as the Session Cookies were saved to your current browser on your current computer, on the current site.
Since the last one has been changed, the browser's Cookies are no longer known to their session, so you're basically not logged out, you never even were logged in on that site.
At least, that's what the browser thinks: "It's a new site, so you can't be logged in here already."