added history session variable
extracted navbar to its own template
added back button functionality