fix redirects after authorizing