Changed gc_maxlifetime to avoid disconnections
Added ability to include custom javascript (e.g. for google analytics)