Actually it is not possible unless you use the following approach.
The problem here is that the TestCase#sessionId property is scoped within a TestCase, i.e not normally accessible from another TestCase.
Thus it would be preferable if you used the TestSuite property instead.
However, if you really want use the Logout TestCase property instead, you could access the property using a Groovy TestStep in the end of the Login TestCase containing something like this:
def sessionId = context.expand( '${#TestCase#response#declare namespace sam=\'
http://www.example.org/sample/\'; //sam:loginResponse[1]/sessionid[1]}' )
logoutTestCase = testRunner.testCase.testSuite.getTestCaseByName("Logout")
logoutTestCase.setPropertyValue("sessionId", sessionId)