Fix error in user invitation mail.
Add user invitation test.