Updated logic for checking for admin.