DEvice defines API and service call added. Now device defines are fetched from DB before registering the device.
Merged feature-gcm into my branch