Fix #87: security helper converted into component and improved

Fix #87: security helper improvement

Migrated from #4052
I'm not sure it's a good idea. 5.5 isn't that wide adopted yet and it's very likely that people will use 5.4 sice framework itself runs well on it.