Authentication module for socket.io