refactored root endpoint
refactored registration