add function to generate random password
show password after register successfully