Changed the authentication to attempt a basic auth login through geoserver's rest api.