XWIKI-3492: Registration issues when email-verication/authentication enabled

Merge PR #113 by Thomas Delafosse.
Thanks.