Reordered tutorial 1 so that the database is configured first.

This change is required after the introduction of
SessionAuthenticationMiddleware to the default middleware