Validate passwords properly when creating an account. Fixes #419.