implemented email sending in invitation
fixed a bug in a data migration, requring auth.User to be present