secured the socket authentication