updated admin.js for isAdmin