500 error on login page in production

Thank You, this solved it. I copied my temporary deployment link DigitalOcean gave me into middleware.js and it worked. Spent 3 hours trying to figure it out