added md5 encryption support, some changes in socket.go