Modified so that index changes the layout and javascript code depending on whether user is logged in
and removed unnecessary pages.