generate random password before validation