diff --git a/Changelog.md b/Changelog.md
index 030d410..6bfca29 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -24,6 +24,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
 ### Changed
  - Disallow uploads if editing is disabled. Previously files could still be uploaded even if editing was disabled - unless `upload_enabled` was set to `false`.
  - Added `x-login-required: yes` header to responses that redirect to the login page for easy detection by machines
+ - Added `x-login-success: (yes|no)` header to login responses for easier machine parsing
 
 ## v0.15.1
 
diff --git a/build/index.php b/build/index.php
index f39bbc4..b555644 100644
--- a/build/index.php
+++ b/build/index.php
@@ -7244,21 +7244,23 @@ register_module([
 		add_action("checklogin", function() {
 			global $settings, $env;
 			
-			//actually do the login
+			// Actually do the login
 			if(isset($_POST["user"]) and isset($_POST["pass"]))
 			{
-				//the user wants to log in
+				// The user wants to log in
 				$user = $_POST["user"];
 				$pass = $_POST["pass"];
 				if($settings->users->$user->password == hash_password($pass))
 				{
+					// Success! :D
 					$env->is_logged_in = true;
-					$expiretime = time() + 60*60*24*30; //30 days from now
+					$expiretime = time() + 60*60*24*30; // 30 days from now
 					$_SESSION["$settings->sessionprefix-user"] = $user;
 					$_SESSION["$settings->sessionprefix-pass"] = hash_password($pass);
 					$_SESSION["$settings->sessionprefix-expiretime"] = $expiretime;
-					//redirect to wherever the user was going
+					// Redirect to wherever the user was going
 					http_response_code(302);
+					header("x-login-success: yes");
 					if(isset($_GET["returnto"]))
 						header("location: " . $_GET["returnto"]);
 					else
@@ -7267,7 +7269,9 @@ register_module([
 				}
 				else
 				{
+					// Login failed :-(
 					http_response_code(302);
+					header("x-login-success: no");
 					$nextUrl = "index.php?action=login&failed=yes";
 					if(!empty($_GET["returnto"]))
 						$nextUrl .= "&returnto=" . rawurlencode($_GET["returnto"]);
diff --git a/module_index.json b/module_index.json
index e30a8cc..7a1e55b 100755
--- a/module_index.json
+++ b/module_index.json
@@ -203,7 +203,7 @@
         "author": "Starbeamrainbowlabs",
         "description": "Adds a pair of actions (login and checklogin) that allow users to login. You need this one if you want your users to be able to login.",
         "id": "page-login",
-        "lastupdate": 1511518191,
+        "lastupdate": 1522412068,
         "optional": false
     },
     {
diff --git a/modules/page-login.php b/modules/page-login.php
index fc19aac..0d53158 100644
--- a/modules/page-login.php
+++ b/modules/page-login.php
@@ -86,21 +86,23 @@ register_module([
 		add_action("checklogin", function() {
 			global $settings, $env;
 			
-			//actually do the login
+			// Actually do the login
 			if(isset($_POST["user"]) and isset($_POST["pass"]))
 			{
-				//the user wants to log in
+				// The user wants to log in
 				$user = $_POST["user"];
 				$pass = $_POST["pass"];
 				if($settings->users->$user->password == hash_password($pass))
 				{
+					// Success! :D
 					$env->is_logged_in = true;
-					$expiretime = time() + 60*60*24*30; //30 days from now
+					$expiretime = time() + 60*60*24*30; // 30 days from now
 					$_SESSION["$settings->sessionprefix-user"] = $user;
 					$_SESSION["$settings->sessionprefix-pass"] = hash_password($pass);
 					$_SESSION["$settings->sessionprefix-expiretime"] = $expiretime;
-					//redirect to wherever the user was going
+					// Redirect to wherever the user was going
 					http_response_code(302);
+					header("x-login-success: yes");
 					if(isset($_GET["returnto"]))
 						header("location: " . $_GET["returnto"]);
 					else
@@ -109,7 +111,9 @@ register_module([
 				}
 				else
 				{
+					// Login failed :-(
 					http_response_code(302);
+					header("x-login-success: no");
 					$nextUrl = "index.php?action=login&failed=yes";
 					if(!empty($_GET["returnto"]))
 						$nextUrl .= "&returnto=" . rawurlencode($_GET["returnto"]);
