improve interface of registration and add javascript to checkbox