Improve field matching accuracy

 * Set the InputField.type attribute based on the field type.
   This improves matching of the password field.

 * Make comparison of field ID/name against common values for
   username/account field case-insensitive