[75075362] Move models import to after db.
[75075362] Add redirect handling.