Fixed integration tests for invitations by setting host to www.example.com; also delete duplicate invitations when saving the latest one