fix NPE registration_requires_email_confirmation flow

1. enable registration_requires_email_confirmation flag
2. register user
3. NPE

So, I fixed.