I can't diagnose what is wrong on your local without doing a screen sharing session to debug it.
The looping issue implies that there is a problem with Session storage on the localhost. I could see that problem if the login page redirects to the content page, but they don't share the same session so the contents page redirects you back to the login page but the login page has the session set so it redirects you to the content page and the infinite loop continues.