Retrieve Google Cloud Messaging sender id from server and a couple of bug fixes.