Add new identity validation and some password generation improvements.