Invitation improvements.

Decouple invitations from the registration process and add a few features to them.