fixes #4: Reg with API after getting GCM reg ID

Awful code. I need to learn to code where I don't control the
construction of objects.