Fixes 'make dist'
Add function for connecting to server by endpoint url. It is used in commandline client and in the python bindings.