changing infinite sync on connection to waiting only 10 seconds and failing otherwise

(though right now it's failing with 500 server error - better approach should be taken here)
improved the way how disconnection from a server works, though it will still throw NPE if tried to call twice.
made multiple connections and disconnections work.
Basic, a bit hackish logic but it gets the job done for now - sends the
message and receives a response (though not represented by a resource,
raw string for now)