ended the REST session