Insight connectors dev 4 4

This PR combines commit from gh-1278 and gh-1304. Not all commits are applicable to ```dev_4_4```.
This should fix connection issue noticed on ```develop``` and at times on ```dev_4_4```.
To test:
 * import data.
 * Browse dataset.
 * View images.
 * etc.

This might require to use the client for few days before the PR can be merged.

----
--rebased-from #1304 
--rebased-from #1278 
etc