making sure session and header appear before all html code