found an error in the app.py that was leading to the redirect issues