Between 5.4.5.1 and 5.4.6.0 I don’t think the login design handles areas related to being already logged in correctly - https://squizmap.squiz.net/matrix/12061
After that I think you could just render something in the LOGUT_SECTION based on the current URL including _login.
Thanks David - that squizmap got me looking at the parse file code (copied from another piece of work) and I have found where the error message was, and adapted the page further to work as required.