Issue title: It won't let me log in. 500 server error
 Issue body: ### Describe the issue
[A clear and concise description of what the problem is.]

### Reproduction steps
Steps to reproduce the behavior:
1. [Go to '...']
2. [Click on '...']
3. [Scroll down to '...']

### Expected behavior
[A clear and concise description of what you expected to happen.]

### Observed behavior
[A clear and concise description of what actually happened.]

### Screenshots and GIFs
[If applicable, add screenshots and GIFs to help explain your problem.]

[Please also attach additional files if a specific project/dataset is useful to investigate the problem.]

### Desktop (please complete the following information)
 - OS: [e.g. Windows]
 - QGIS Version [e.g. 3.22.0]
 - QFieldSync Version [e.g.4.0.0]

### Mobile (please complete the following information)
 - Device: [e.g. iPhone6]
 - OS: [e.g. Android 11]
 - QField version: [Enter QField version here including build number found in the about screen after the release name example 2.0.0 (10200993)]

### Additional information
* Problem started happening recently, didn't happen in an older version of QField: [Yes/No]
* Problem can be reliably reproduced, doesn't happen randomly: [Yes/No]
* Problem happens with all files and projects, not only some files or projects: [Yes/No]

[If the problem happened with QFieldCloud, please add your username and project name.]

 Comments: 
 Comment 0: Please follow the thread here: https://github.com/opengisch/QField/discussions/3050
{'source': 'GithubIssues', 'repo_name_with_owner': 'opengisch/QField', 'issue_id': 1293287267, 'repo_stars': 502.0}