updated authentication.js