add control on the thread

now you can start or stop a thread with the web page

bug:
	it will request the api very fast