Redirect doesnt work

When I use this code for a login form:


// Assign the attributes

            $loginForm->attributes = $_POST['LoginForm'];

            

            // Validate user input

            if ($loginForm->validate()) {


                // Redirect to the previous page

                $this->redirect(Yii::app()->user->returnUrl);

                

            }

And he filled all the required field, nothing is happing … No errors

The Yii::app()->user->returnUrl, is filled in when I debug it.

May be $loginForm->validate() returns false