Successful login redirects to wrong location

I have configured nginx to access the Matomo docker container as subdirectory

www.mywebsite.com/statistics

Everything works fine but there is one annoying issue: When I log in Matomo redirects me automatically to

www.mywebsite.com//

but it should be: www.mywebsite.com/statistics/

How can I configure the redirect that happens after successful login?