Isn't it kinda counter-intuitive to be shown a login page right after logging out?
I suggest not showing the login page, but instead redirecting to the main page (which is where the user was before clicking the link).