fix socket.io authorization logic