I could see how this may be desired by many people in different situations. It would be easy to make this part of the config. Just set a config array variable with the "logout url" in the config file - or leave the variable blank. Then in the code do a simple if test. If the value is there, execute the line. If the variable has no value, back to the login page. A very easy two line mod (one to each file - config and index) to make this a config option.
I would suggest that mod, but I don't know how to do that around here. There should be a place to submit proposed code in the forum.