title: Exit from application via button in titanium
body: <p>I am very new to titanium when i am trying to exit from the application by clicking the  button it displays the titanium splash screen again!!</p>
  
  <p>I am using the following code</p>
  
  <pre><code>var win=Ti.UI.createWindow({
      backgroundColor:'#ddd',
      exitOnClose:true        
  });
  
  var button=Ti.UI.createButton({
      title:'back',
      left:10,top:10  
  });
  
  button.addEventListener('click',function(e){
      win.close();
  });
  
  var text=Ti.UI.createLabel({
      text:'Home page',
      color:'#000',
      font:{ fontSize:20} 
  });
  
  win.add(button);
  win.add(text);
  
  win.open();
  </code></pre>
  
  <p>How can I exit from the application through button click?</p>