Fixed registerUser in DatabaseController.