Add cookie functionality.
Add all the basic functionality of index.php and the connection to monitor.php