Moved common session and database logic to header.php.
Merge pull request #1 from polaris8920/fixed-up

Moved common session and database logic to header.php.