Updated forgot_password()

If identity is set to username it was showing invalid email address. So the modified code first checks if the identity in ion config file is set to "username" or "email". If it is set to "username" we need to erase valid_email rule.