added decorator handleRedirect
merge