in reply to Generate a session ID

Since this is random, you can get collisions from it. Don't use it without checking to see if the ID is already in use.