Database connection and index page set up.