Added password restore function