Client now can change it's state according to server's instructions
Fixed issue where the server sends several lines at once so client crashes