Fix two bugs

* Change identifier property to be a string
* Add check whether a State exist
Merge branch 'master' of github.com:gebruederheitz/persistent_session