I think the restore is better done in OpenID.controller rather than in Register.controller

Signed-off-by: emanuele <emanuele45@gmail.com>
Extra options in registration moved to a function

Signed-off-by: emanuele <emanuele45@gmail.com>
$secret got lost while refactoring

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

Signed-off-by: emanuele <emanuele45@gmail.com>
A function to "validate" custom fields

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