updated for local sqlite use
checking cookies
added some stats