Fixing authentication redirects.