implemented endsession