added a check for whether or not a user is an admin