changed redirects to use HttpResponseRedirect