fix bugs on auth/index.js