How to include error message on login
The thing here is that you keep all code in your template file, which will prevent some of it from executing. Once you load your template without being logged in auth_redirect() will be run. This function stops the page loading and redirects to the login page, thus your login_head callback will never be called. Try … Read more