Handle lost session
The DPW session can be lost at any moment if the user logs in on another device or leaves the app open for a long time. This also happens a lot during development.
We should check whether the session is still active when running scripts and handle the case when the session is lost. For example by logging in again.