Implemented better error handling

+ Client tries now one automatic reconnect after 2.5 seconds if the
connection is lost. (A user dialog will be added later)