Refactor invitations to support accepting/declining from emails.