fixes logout problem for view-restricted pages

added test for 66639bce69