Ajax redirection modified