Aded check_session.php improved template.php near final version for starting work