Fix a javascript error in the registration page when security level was higher than the minimum - thanks scripple for reporting

Signed-off-by: emanuele <emanuele45@gmail.com>