Refactoring and general cleanup of helper.php & mod_sclogin.php #jfbconnect-1259 Fixed