implemented auto-connect on startup