Edited connection and template

Removed session_start from connectio, because it was messing with the
logic flow in some of my code. Make sure you call session_start.