Added an overlay to detect user interaction. Improved socket reconnection code.