Fixed HTTP protocol compliance issues
Fixed bugs in sensors log JSON generator

There were some bugs causing incorrect JSON being generated, it is fixed
now.