updated invitations to assign account id and updated view to show if invitation is pending