Fixed a major bug allowing non-authenticated user to view unauthorized page.