Fixed backend crashing on connection error. Improved frontend xhr-error handling.