Fixed issue with redirection after authentication not working in production.