generated codes for password recovery