end session method