Add db connection to views and controllers