Mostly updates to main, fixed some handling issues with page redirects.  created log for handling logging of error, etc. Created Database class for handling all database calls and retrievals.