title: login in Yii opens new window insted of staying in same window
body: <p>I'm new in Yii framework, I build a system and there is a login page, when I make login it opens a new page instead of staying in the same page, how can i fix this problem</p>
  
  <p>$this->redirect('mysite.com/site/home');</p>
  
  <p>Login Form in view</p>
  
  <pre><code>&lt;div class="login_form"&gt;
           &lt;h3&gt;Admin Login&lt;/h3&gt;
           &lt;form action="" method="post"&gt;
                  &lt;fieldset&gt;
                      &lt;dl&gt;
                          &lt;dt&gt;&lt;label for="username"&gt;Username:&lt;/label&gt;&lt;/dt&gt;
                          &lt;dd&gt;&lt;input type="text" name="username" id="username" size="30" /&gt;&lt;/dd&gt;
                      &lt;/dl&gt;
                      &lt;dl&gt;
                          &lt;dt&gt;&lt;label for="password"&gt;Password:&lt;/label&gt;&lt;/dt&gt;
                          &lt;dd&gt;&lt;input type="password" name="password" id="password" size="30" /&gt;&lt;/dd&gt;
                      &lt;/dl&gt;
                      &lt;dl&gt;
                          &lt;dt&gt;&lt;label&gt;&lt;/label&gt;&lt;/dt&gt;
                      &lt;/dl&gt;
                       &lt;dl class="submit"&gt;
                      &lt;input type="submit" name="submit" id="submit" value="Enter" /&gt;
                       &lt;/dl&gt;
                  &lt;/fieldset&gt;
           &lt;/form&gt;
           &lt;/div&gt;  
  </code></pre>
  
  <p>in SiteController</p>
  
  <pre><code>class SiteController extends Controller
  {
      public function actionIndex()
      {
          $form=new LoginForm;
          if(isset($_POST['username']) &amp;&amp; isset($_POST['password']) )
          {
              $form-&gt;attributes = array('username' =&gt; $_POST['username'], 'password' =&gt; $_POST['password']);
              if( $form-&gt;validate()  &amp;&amp; $form-&gt;login() ) {
                  Yii::app()-&gt;request-&gt;cookies['name'] = new CHttpCookie('mycookie', 'value');
                  $this-&gt;redirect('mysite/site/home');
              }
              else {
                  die('Invalid login');
              }
          }
          $this-&gt;render('login', array('form' =&gt; $form));
      }
  }
  </code></pre>