fix problem where cancelling invitations deletes them

feature complete invitations system