Fix formatting for user model
WIP
Fix invitation flow with errors
Use ajax forms to invite new users
Fixup all the broken tests
Merge branch 'invitations'