Template for socket.io token-based authentication