code: https://pastebin.com/mGUecsv8
What the script is supposed to do is allow users to log in without a password. It uses the computer's ID as the user's key, meaning only that PC can log you in. To authorise a PC, the server needs to generate a key for the user. The user can use that to log in the first time, then they no longer need to use a password to log in. The code above is the server side of things.
I was inspired by this Ask A Pro thread and the linux passwordless login system.
I'm 90% sure I'm gonna kick myself when I figure out/find out what the problem is.
Thanks, pros!