Added autoconnect thread