Added persistent sessions using mongoDB via connect-mongo.  Also made the database connection code more forginging to bad config data.