Add processing of thread stop.
Add test function about when error in session, authToken check empty.