Adding in reconnect logic to cloud.