Fix #87: security helper converted into component and improved

Fix #87: security helper improvement

Migrated from #4052
@ircmaxell thanks. Can you confirm that PASSWORD_DEFAULT at present amounts to the same thing as PASSWORD_BCRYPT?