Grafana on nginx gives {"message":"invalid username or password","traceID":""}

I first had to change the admin password from the initial one. Then I had to set up the nginx config like this

location /dashboard/ {
        proxy_set_header Host $http_host;
        proxy_pass http://127.0.0.1:3000;
    }

and then set up the grafana config like this

[server]
domain = nlp.galeai.co
root_url = %(protocol)s://%(domain)s:%(http_port)s/dashboard/
serve_from_sub_path = true