Update collectionapi.js

Debug auth with console.log