fix Authentication in index.js