Part of the Mobile Access Portal Agent's mechanism requires having access to "itself", meaning to the following address: https://localhost:14186/id
Since this request is forwarded to the Proxy instead, the proxy rejects it with the HTTP error shown above and the Mobile Access Portal Agent ends up not completing this request.
This is what triggers the pop-up "You are disconnected, please login again".