moved call to encode_passwords before save_properties