extracted code to open ZABBIX API session as a function to be used conveniently from sub classes.