added 500.html error file template
So much....
Cookie magic and shutdown fixes