Added password generatePin function