Grafana behaviour after changing root_url

Hello, I want to run my grafana behind /grafana prefix, so that it does not think that it runs on the / root url.
I changed the setting like this:

root_url = %(protocol)s://%(domain)s/grafana/

I can now reach the webUI on my domain/grafana however, any action I want to take gives me an error, for example changing the admin password gives me an error " failed to change password" or adding any Datasource gives me the error " failed to add datasource "

Its as if something is redirecting my changes to a wrong url still? I am sure that my Datasource is available because I have another grafana instance running on root_url / and it works fine. Can someone please explain to me how I can tell grafana that its running behind http://mydomain/grafana/ ?