Added support for regenerating password.