Worked a bit on client api

I have a race condition - the client doesn't wait for the welcome
message and therefore can send requests before the server is ready to
treat them. I should consider a solution involving the welcome message.