Added allowRegister option