session_tag logic