add redirectTo  function in controller