It would require to cache (both in the server and client) a second unique session id generated by the server part. Then, every time a client re-connects it should identify itself with the session id or, in the case of a new session, request one. You can also garbage-collect or implement a timeout for the outdated sessions in the server.
For the client-side caching I suggest you use cookies for easy consistency. (you can alternatively try jStorage if you use jQuery, mootools or prototype)
Speaking technically,
On the server:
The 'connect' event should do nothing related
The 'message' event should recognize { 'session': null } and { 'session': id } (id can be a hash for basic security)
In the first case you generate a new session object in your session store (use a persistent one or use a global/scope map) and fall-through to:
In the second case you assign the passed client object's .session = message's .session and update the session object's .connected attribute to true.
client.session = message.session;
sessions[ client.session ].active = true;
sessions[ client.session ].client = client;
The 'disconnect' event should update
sessions[ client.session ].active = false;
sessions[ client.session ].lastactive = new Date();
sessions[ client.session ].client = null;
Set up an interval to check for outdated sessions and remove them from the session store
Don't forget to check for client.session before you send a message, and implement your own broadcast that iterates through the active sessions instead of clients
On the client:
Set socket.session = null
In the 'connect' event you should check for a previous session id and use this, or request a new one (using the protocol in the server's 'message' event) and update socket.session
Check for socket.session before you send a message.
Being simple as it is, multiple tabs would break the sever->client transmission for the older tabs. Make a client store in each of the sessions object instead of a setting a single one.
Alex