Added session vars and topnavbar handling