Added function on DAO to create a token and write it at DB