Move redirect from the model to the route handler.