diff --git a/docs/REST.md b/docs/REST.md
index 3160cf7..c6004a0 100644
--- a/docs/REST.md
+++ b/docs/REST.md
@@ -91,7 +91,9 @@ Register a new user.
 
 **Authentication**: no
 
-**Parameters**: Username, password, confirm
+**Parameters**: Username, password, confirm, invite(optional)
+
+Invite is an optional invite code to bypass disabled registration.
 
 **Response**: If successful, returns a json object with the users stream key. Otherwise returns `{error: "error reason"}`
 
diff --git a/src/http.ts b/src/http.ts
index 4f2544d..0c0aa6b 100644
--- a/src/http.ts
+++ b/src/http.ts
@@ -507,12 +507,6 @@ async function initSite(openReg) {
 		}
 		else res.render('invite.njk',Object.assign({icode: req.params.code}, njkconf));
 	});
-	app.get('/invite', (req, res) => {
-		if(tryDecode(req.cookies.Authorization)) {
-			res.redirect('/profile');
-		}
-		else res.render('invite.njk',Object.assign({icode: ""}, njkconf));
-	});
 	app.get('/register', (req, res) => {
 		if(tryDecode(req.cookies.Authorization) || !openReg) {
 			res.redirect(njkconf.rootredirect);
diff --git a/templates/invite.njk b/templates/invite.njk
index 9b2b30b..c181635 100644
--- a/templates/invite.njk
+++ b/templates/invite.njk
@@ -6,8 +6,8 @@
 			<form action="/api/register" method="POST" target="responseFrame">
 				Username: </br><input type="text" name="username" style="min-width: 300px" placeholder="e.g. lain"/></br>
         		Password: </br><input type="password" name="password" style="min-width: 300px"/></br>
-				Confirm: </br><input type="password" name="confirm" style="min-width: 300px"/></br>
-				Invite Code: </br><input type="text" name="invite" style="min-width: 300px" value="{{icode}}"/></br></br>
+				Confirm: </br><input type="password" name="confirm" style="min-width: 300px"/></br></br>
+				<input type="hidden" name="invite" style="min-width: 300px" value="{{icode}}"/>
 				<input type="submit" value="Submit">
 			</form></br>