optimize uniqid usage

optimize Session and Token classes