use Redirect::intended instead of Redirect::to;