fixed implementation of Session::getHasSessionId().