Adding security features and fixing HTML5 BP integration bug that caused toggling if H5BP was enabled instead of persistence