Hi,
It is totally normal that your modem hangs when it doesn't finish a task that is supposed to finish. When you send a POST/GET request to the router - which then sends a request to the modem, after closing the browser tab it doesn't mean that you stopped the request. It was sent but never got a response.
So let's say the modem hangs as it tries to finish the prompt, but while it has no connection - it cannot.
About your other issue with the PIN. It should be also normal that it doesn't take the PIN from configs, as gsmctl only reboots the modem, but does not search for the PIN. Could you try rebooting it from WebUI instead? Status > Network > Restart Modem It should get your PIN if you do that.
EB.