Fix issues with auth on redirect