title: IOS - How to disable push notification at logout?
body: <p>My app registers the account at login in my server to enable push notification for a chat. Yet I haven't implemented yet the unregistration of the account at logout, so in this moment if I do the login with <strong>2</strong> accounts in the <em>same</em> device it can take the notification of both the accounts. At the same time, my notification center has a POST service which unregisters the 'login_name+ device token' from receive notification center. Where should I call it? Do I have to use <code>unregisterForRemoteNotifications</code>? I just want to unregister the account+Device token from push notification, not to disable the entire app notification forever.</p>
  
  <p>Can I save my device token on <code>didRegisterForRemoteNotificationsWithDeviceToken</code> function like </p>
  
  <pre><code> $ [[NSUserDefaults standardUserDefaults] setObject:hexToken forKey:DEVICE_KEY];
  </code></pre>
  
  <p>and then, at logout, call my POST function "removeDeviceToken" like </p>
  
  <pre><code>  NSString *deviceToken = [userDefaults objectForKey:DEVICE_KEY];
      if(deviceToken != NULL){
         [self.engine removeDeviceToken:deviceToken];
       }
  </code></pre>