refactored user reg and some worker stuff