Changed behaviour of unexpected disconnects and added a reconnect button.