fixes logout problem for view-restricted pages