removing session for static files & added a test for  main controller exception: headerSent