Problem
When switching from local server to demo server (or vice versa), app bundle downloads fail with 401 Unauthorized errors. The error occurs when downloading form files (schema.json, ui.json) from the new server.
Root Cause
The authentication token is cached in memory after the first use. When switching servers, the cached token from the previous server is reused, causing authentication failures on the new server.
Expected Behavior
App bundle should download successfully after switching to a different server.
Steps to Reproduce
- Login to local server
- Switch to demo server
- Attempt to download app bundle
- Observe 401 errors for all file downloads