set proper session