change json representation to lowercase
adding mongodb support, with an index for the id field and handle token collisions