Fixes redirect to enable https after login