Fixed a bug where opening view.jsp while not logged in produced errors in console.