Auto login on debian 12 fails

I am using snap nextcloud-client 3.12.4 on a raspberry pi 5 with a debian 12.

After every reboot I have to log in to my nextcloud server again by connecting via vnc and using the browser login. This is annoying because I want to use my raspberry pi as a headless computer and administer it by ssh.

When I log in with chrome via “grant access” I am able to log in and access is granted.
If I log in with app-token, the same user and password is considered incorrect and the login fails.

Anybody any idea what is going wrong?