Update Session.php

Refactoring of methods creating id