Perfect function of retrieve password