Better session id needs to be rw fix

Related to #460.

If the Session id attr is set, we should mark the Session as dirty.