updated index.js with cradle to access couchdb - update getAllLogs function