Changes the way of generate random int and ensures the \n character removed is at the end of the token.
Ensures to remove urls trailing slash and validates cp code.
Implements du helper for easier usage.
Validates that params and action exist.
Merge pull request #2 from micho8402/master

Fixes authentication issue, adds a helper for du method and several validations