Use same uid() function on server and client.