Update collectionapi.js

Debugging auth check