cakephp/cakephp — pull request #4858 by ahmyi (2014-10-10 21:09:16+00:00)
Title: Repaired loop if referrer is equal to current

If in any case when applying below code to redirect on successful login

```php
$this->redirect($this->referer($this->Auth->loginRedirect));
```
if first attemp fails, the referrer is equal to login page, thus, ends up in a redirect loop at login page.