HTTP API and the login Form issue

We have this issue when going to production server...
When trying to use the REMOTE HTTP API as indicated in the documentation, we are unable to execute commands.

We pass the correct admin username/password in the URL but we're thrown back into the login form, here's and example of one of the URLs we use:

https ://root:xxxxxx@bernard:10000/virtual-server/remote.cgi?program=list-domains&name-only=

But we found that if we disable the Session Authentication on the Authentication module of Webmin, we're able to use the HTTP API with URLs like the one above. But this step eliminates the login form for other users and instead uses the browser's built in authentication dialog for login in.

We had the HTTP API and the login form working correctly without making the change in Webmin's configuration, but a few weeks back we installed a new certificate and we don't know If that might be causing some conflict of some sort.

We'd like some help to try and make the HTTP API and the login form work together.

Status: 
Closed (fixed)