add password func same reg