I have that very same problem,
I use the userGroups extension… on development it works flawlessly but [color="#0000FF"]on the production server we have that redirect loop[/color]… and I can’t seem to find the source of it.
[color="#006400"]Ubuntu Server 14.04, PHP 5.5.9-1ubuntu4.9 (cli)[/color]
[color="#FF0000"]I have commented:
UserController::filters() and UserController::accessRules()
so there’s no security to test this, and I still have a redirect loop[/color]
CONTROLLER: /modules/userGroups/controllers/UserController
public function actionLogin()
{
$model = new UserGroupsUser('login');
// if it is ajax validation request
if(isset($_POST['ajax']) && $_POST['ajax']==='login-form')
{
echo CActiveForm::validate($model);
Yii::app()->end();
}
// collect user input data
if(isset($_POST['UserGroupsUser']))
{
$model->attributes=$_POST['UserGroupsUser'];
// validate user input and redirect to the previous page if valid
if($model->validate() && $model->login()) {
if( isset($_SESSION["redirectUrl"]) )
{
$urlBuff = $_SESSION["redirectUrl"];
unset($_SESSION["redirectUrl"]);
$this->redirect($urlBuff);
}
if( isset($_SESSION["timeoutRedirect"]) )
{
$urlTimeBuff = $_SESSION["timeoutRedirect"];
unset($_SESSION["timeoutRedirect"]);
$this->redirect($urlTimeBuff);
}
$this->redirect(Yii::app()->user->returnUrl);
}
}
$this->layout = '//layouts/client';
// display the login form
if (Yii::app()->request->isAjaxRequest || isset($_GET['_isAjax']))
$this->renderPartial('/user/login',array('model'=>$model));
else
$this->render('/user/login',array('model'=>$model));
}
HERE: If I comment
//if (Yii::app()->request->isAjaxRequest || isset($_GET['_isAjax']))
$this->renderPartial('/user/login',array('model'=>$model));
// else
// $this->render('/user/login',array('model'=>$model));
[color="#0000FF"]I have a basic form with no layout nothing but is works, I can login[/color]

[color="#FF0000"]If I use: $this->render(’/user/login’,array(‘model’=>$model)); I get a redirect loop [/color] 
VIEW: /modules/userGroups/views/user/login.php
<?php $this->breadcrumbs=array(
'login',
);
?>
<div id="userGroups-container" style="padding: 15px;">
<?php if(isset(Yii::app()->request->cookies['success'])): ?>
<div class="info">
<?php echo Yii::app()->request->cookies['success']->value; ?>
<?php unset(Yii::app()->request->cookies['success']);?>
</div>
<?php endif; ?>
<?php if(Yii::app()->user->hasFlash('success')):?>
<div class="info">
<?php echo Yii::app()->user->getFlash('success'); ?>
</div>
<?php endif; ?>
<?php if(Yii::app()->user->hasFlash('mail')):?>
<div class="info">
<?php echo Yii::app()->user->getFlash('mail'); ?>
</div>
<?php endif; ?>
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'login-form',
'enableAjaxValidation'=>false,
'focus'=>array($model, 'username'),
)); ?>
<!--<div class="form row container" >-->
<?php // echo $form->errorSummary($model); ?>
<!--</div>-->
<div class="form center">
<p class="note"><?php echo Yii::t('userGroupsModule.general', 'Fields with {*} are required.', array('{*}' => '<span class="required">*</span>'))?></p>
<div class="row">
<?php echo $form->labelEx($model,'username'); ?>
<?php echo $form->textField($model,'username', array("class"=>"form-control") ); ?>
<?php echo $form->error($model,'username'); ?>
</div>
<div class="row">
<?php echo $form->labelEx($model,'password'); ?>
<?php echo $form->passwordField($model,'password', array("class"=>"form-control") ); ?>
<?php echo $form->error($model,'password'); ?>
</div>
<div class="row checkbox">
<?php echo $form->checkBox($model,'rememberMe',["class"=>"btn btn-primary"]); ?>
<?php echo $form->label($model,'rememberMe'); ?>
<?php echo $form->error($model,'rememberMe'); ?>
</div>
<?php if (UserGroupsConfiguration::findRule('registration')): ?>
<div class="row">
<?php echo CHtml::link(Yii::t('userGroupsModule.general', 'register'), array('/userGroups/user/register'))?>
</div>
<?php endif; ?>
<div class="row buttons">
<?php echo CHtml::submitButton('Login',["class"=>"btn btn-primary"]); ?>
</div>
<?php $this->endWidget(); ?>
</div><!-- form -->
</div>
Someone have and idea?