Flask login_required and webpage redirect loop
It sounds like your login_view
is set to be the results page, which is why you get a redirect loop - a user which is not logged in gets redirected to the same page again and again.
Have a look here to understand how to set the view for the login:https://flask-login.readthedocs.org/en/latest/#customizing-the-login-process