This change should hopefully make devise redirect correctly in production, but may break the entire site.