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

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