Added authentication to sockets