Add date functionality for logging. Use socket.on('connect',function(){}) each time client connects/reconnects to get system's state.