More helper functions
A few small tweaks

Changed 'wearerid' to 'waiterid' and removed a double declaration of
'$seconds', also create a user_key when creating a user