refactor views, move db connection into base class
+refactor models, move db access method into base class
+db settings in hte right place
+insert or update rule for users
+now we can normally use db in models. Some dao logic moved in base model class
+secure cookies