DEvice defines API and service call added. Now device defines are fetche...

...d from DB before registering the device.
Start using SPARKK_LOG else will be a huge re-work.