Fixed the bug in authentication.js