Bad Gateway when submitting forum

I have been working on creating a self hosted simplelogin I have managed to work my way through and have got this publicly accessable on my domain. When signing up I get "Bad Gateway" I think this is something to do with multiple networks as I can see on the HTTP Service the internal docker IP change from one network to the other randomly and I've no idea why.

To clarify exactly what's happening is, I can access simplelogin.MYDOMAIN.com and but when I click signup it gives me Bad Gateway.

Here is my docker-compose file.

version: '3.3'
services:
    postgres:
        container_name: sl-db
        environment:
            - POSTGRES_PASSWORD=PASSWORD
            - POSTGRES_USER=USER
            - POSTGRES_DB=simplelogin
        ports:
            - '127.0.0.1:5433:5432'
        volumes:
            - '/home/stuart/simplelogin/db:/var/lib/postgresql/data'
        restart: always
        networks:
            - traefik
            - sl-network
        image: 'postgres:12.1'
    app:
        container_name: sl-app
        volumes:
            - '/home/stuart/simplelogin:/sl'
            - '/home/stuart/simplelogin/upload:/code/static/upload'
            - '/home/stuart/simplelogin/simplelogin.env:/code/.env'
            - '/home/stuart/simplelogin/dkim.key:/dkim.key'
            - '/home/stuart/simplelogin/dkim.pub.key:/dkim.pub.key'
        ports:
            - '127.0.0.1:7777:7777'
        depends_on:
            - 'postgres'
        restart: always
        networks:
          - traefik
          - sl-network
        labels:
            - "traefik.enable=true"
            - "traefik.http.routers.simplelogin.entrypoints=websecure"
            - "traefik.http.routers.simplelogin.rule=Host(`simplelogin.MYDOMAIN.com`)"
            - "traefik.http.routers.simplelogin.tls.certresolver=myresolver"
        image: 'simplelogin/app:3.4.0'
    email_handler:
        container_name: sl-email
        volumes:
            - '/home/stuart/simplelogin:/sl'
            - '/home/stuart/simplelogin/upload:/code/static/upload'
			- '/home/stuart/simplelogin/simplelogin.env:/code/.env'
            - '/home/stuart/simplelogin/dkim.key:/dkim.key'
            - '/home/stuart/simplelogin/dkim.pub.key:/dkim.pub.key'
        ports:
            - '127.0.0.1:20381:20381'
        depends_on:
            - 'app'
        restart: always
        networks:
            - traefik
            - sl-network
        command: python email_handler.py
        image: 'simplelogin/app:3.4.0'
    job_runner:
        container_name: sl-job-runner
        volumes:
            - '/home/stuart/simplelogin:/sl'
            - '/home/stuart/simplelogin/upload:/code/static/upload'
            - '/home/stuart/simplelogin/simplelogin.env:/code/.env'
			- '/home/stuart/simplelogin/dkim.key:/dkim.key'
            - '/home/stuart/simplelogin/dkim.pub.key:/dkim.pub.key'
        depends_on:
            - 'email_handler'
        restart: always
        networks:
            - traefik
            - sl-network
        command: python job_runner.py
        image: 'simplelogin/app:3.4.0'

networks:
  traefik:
    external:
      name: traefik_net
  sl-network:
    external:
      name: sl-network

Ok so I managed to resolve the issue regarding traefik using the wrong network. I was able to define it using

traefik.docker.network=traefik

However my issue still occurs, I try to sign up and upon submitting I get "502 Bad Gateway" and in the console it shows as a post request to simplelogin.mydomain.com/auth/register as bad gateway.

Any suggestions?

Edit: I'm wrong, adding the line above hasn't solved that part of the issue at all.