Fix timezone middleware

Small fix to avoid raising an exception when migrating an existing app and there is no user account in the database yet.

Cheers