Implemented GCM client code
Some additional modifications to GCM registration