some preparations for session stuff