#27 load files and start session before outputting html

this will fix "headers already sent" errors