app->previousUrl, refactor app->redirect