Polish connection error handling further, and actually use the values in the fields for test connection, not the ones stored in api.Options