Setup db connection before rendering header