Fix #36 Added reconnect dialog if not connected
Refactored some multithreading to avoid collisions