I think the problem is a combination of how you have your URL setup in the globals and how the access page restriction is setup on your logout page.
It looks like your login link is actually going to your logout page. On this page is a check to see if the user is logged in, if they are not they are taken to the login page. The problem is that the login page will try to take the user back to the logout page on a successful login.
It seems to me that you should make the link to the login page go directly to the login page, and on your logout page you might have the URL for the page to go to set incorrectly. It looks like it is using a site link and it should be using a relative link. If you can post back with your current login and logout pages I can take a look to see if I can spot the problem.