I'm working on a drupal site. Instead of showing a page with something regarding "permission not found" it just results in a redirect loop. 

`"Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects."` - chrome error

Can someone point me in the right direction? Thanks.

EDIT: This happens when the user is logged in already and goes to a page that they do not have access to. 

The problem is happening in the function login\_register in user.module, where it breaks is the calls to drupal\_get\_form('user\_login') and drupal\_get\_form('user\_register'). In user\_login the line that causes the redirect is: if ($user->uid) { drupal\_goto(''); } In user\_register, it's: if (!$admin && $user->uid) { drupal\_goto('user/'. $user->uid); } When I comment those drupal\_goto lines out, the page shows correctly. 

It however shows the log in screen which I don't want. I want to be able to say "if the user is logged in but does not have permission to view this page, then show a message, otherwise if the user is not logged in, then show the login form"