reworked server side validation, added expiration check
Merge pull request #6 from orefalo/validation

reworked server side validation, added expiration check