Working with server-client communication

Somehow works, but need some fixing.