conditional renew sessions on login/logout