Store sessions in the database.