Fix validations and refactor token generation and validation
Update README.md