Add checkAdmin function to check if the user is an admin.