improved portalconnection for new API changes