fixes logout problem for view-restricted pages
Merge pull request #2049 from schneck/support/2.4.x

fixes logout problem for view-restricted pages