diff --git a/index.php b/index.php
index ba273e4..cfc1785 100755
--- a/index.php
+++ b/index.php
@@ -13,6 +13,7 @@
 use Monolog\Handler\StreamHandler;
 use Monolog\Handler\RotatingFileHandler;
 use \User as User;
+include $TEMPLATE . "strings.php";
 $log = new Logger('signup');
 $log->pushHandler(new RotatingFileHandler(__DIR__ . '/logs/signup.log', 0, Logger::DEBUG));
 
@@ -36,6 +37,20 @@
 $TEMPLATE = template_path();
 
 
+function send_welcome_email(User $user)
+{
+    global $SMTP, $SERVICE_ACRONYM, $WELCOME_TEMPLATE, $TEMPLATE;
+    $TEMPLATE = template_path();
+    include $TEMPLATE . "email.php";
+    $url = "";
+
+    send_mail($user->email, $SMTP, (object) [
+        "subject" => $WELCOME_TEMPLATE->subject,
+        "text"    => replace_all_user_variables($WELCOME_TEMPLATE->text, $user, $url),
+        "html"    => replace_all_user_variables($WELCOME_TEMPLATE->html, $user, $url)
+    ]);
+}
+
 function send_confirmation_email(string $mail, object $smtp, string $url, User $user)
 {
     include 'config.php';
@@ -65,31 +80,34 @@
 function reload_captcha_script()
 {
     include 'config.php';
-    $TEMPLATE = template_path();
-    include $TEMPLATE . "strings.php";
-    echo '
-    <script>
-        const reload_captcha = async (e) => {
-            var cont = document.getElementById("reload_captcha");
-            cont.innerHTML = "<div class=\'spinner-border text-info\' role=\'status\'><span class=\'sr-only\'>' . $STRINGS->reloading_captcha . '</span></div>";
-            var img = document.getElementById("captcha")
-            var url =  "' . $BASE_URL . '/captcha.php?token=' . $_SESSION["captcha_token"] . '"
-            await fetch(url, { cache: "reload", mode: "no-cors" })
-             .then(() => {
-                img.src = url+"&t=" + new Date().getTime();
-                setTimeout( () => {
-                    cont.innerHTML = "<button id=\'reload\' class=\'btn btn-outline-info\' type=\'button\'> <span class=\'glyphicon glyphicon-refresh\' aria-hidden=\'true\'></span></button>";
-                    bindButton()
-                }, 500);
-            })
-        }
-        function bindButton(){
-            var button = document.getElementById("reload");
-            button.addEventListener("click", reload_captcha)
-        }
-        bindButton()
-    </script>
-    ';
+
+    if ($CAPTCHA_LENGTH > 0) {
+        $TEMPLATE = template_path();
+        include $TEMPLATE . "strings.php";
+        echo '
+        <script>
+            const reload_captcha = async (e) => {
+                var cont = document.getElementById("reload_captcha");
+                cont.innerHTML = "<div class=\'spinner-border text-info\' role=\'status\'><span class=\'sr-only\'>' . $STRINGS->reloading_captcha . '</span></div>";
+                var img = document.getElementById("captcha")
+                var url =  "' . $BASE_URL . '/captcha.php?token=' . $_SESSION["captcha_token"] . '"
+                await fetch(url, { cache: "reload", mode: "no-cors" })
+                 .then(() => {
+                    img.src = url+"&t=" + new Date().getTime();
+                    setTimeout( () => {
+                        cont.innerHTML = "<button id=\'reload\' class=\'btn btn-outline-info\' type=\'button\'> <span class=\'glyphicon glyphicon-refresh\' aria-hidden=\'true\'></span></button>";
+                        bindButton()
+                    }, 500);
+                })
+            }
+            function bindButton(){
+                var button = document.getElementById("reload");
+                button.addEventListener("click", reload_captcha)
+            }
+            bindButton()
+        </script>
+        ';
+    }
 }
 
 function register_page($error = false)
