title: How to add a logout feature to an iPhone app?
body: <p>I've an app with this layout:</p>
  
  <p>When you open the app you see a login screen. You log in and you see a tabbar with 3 tabs. (The loginview is displayed with a presentModalView in the appdelegate of tabbar).</p>
  
  <p>In the third tab there is a logout button. I want when logout button is pressed the app delete NSUserDefaults and shows the loginview again. And if you login again the login screen disappear and you see the first tab of the tabbar.</p>
  
  <p>How can I do this?</p>