client and socket improvement

Improve the client ui and socket connection