added validation on resource for membership; fixes #13