Update comments
Various updates to database functions

* Add error message support to show an error if one exists.
* Fix problem with getting data from MySQL SELECT result.
Enable session support in index.php
Run includes/load-includes.php on login.php and register.php
Add HTML header and footer to register page.
Merge branch 'base-system-load-pages' into develop