Set configure block for database and add session cookies