client: Exit after server error

If server return an error response, exit the client instead of trying to
reconnecting. Usually these errors means client sent a bad request.
Merge pull request #88 from nirs/client-error

client: Exit after server error