Do not generate session id when there is already one

[fixes #101]