added call to liveagent api
some cleanup for live-agent api connection