Implemented a better error handling for ajax requests. Exceptions caused by dropping connections are now handled, too.