socket with cookie