Added network status manager. Reconnects on lost connection and closes socket on lost connection