add password generation to register