Repaired confirmation, password reset and unlocking. Fixes #666.