simplified the invite.
fix bug for mixing identifiers
added an internal error exception
restify invites