Switch between local data and cloudant