GCM user id retrieval and storing to database and shared preferences