Add logging config
Add base html templates
Fix db access err