Client side - on refresh of queue place encrypt the time and queue place and store it locally. On successful login delete the previous local data.

Server side - On login send the time and place, decrypt it, and run an algorithm to determine an appropriate place in line.

This shouldn’t be this hard. I’m speaking as a professional software architect. Admittedly I’ve never developed video games, just business applications, but this shouldn’t be hard.