registers with apns/gcm correctly