test for session.data on session removal and add log statement

This is a workaround to avoid a server crash under yet unknown
circumstances.