updated auth.js service