Improved security of OptInHandler.