First of all, great script. Nice compact version of just what I need.
I ended up having to add an 'isset' for the message key of the session in line 78 in order to eliminate an error that was popping up, but now I just get a 'something went wrong' without an entry in the apache log when I attempt to add a user. How would I best debug this and find the source of the error?
I'm on an RPi on Occidentalis, sqlite3, php5.