Added redirects if not ajax call