Server with an updated registerUser()