 		readPackages -> res.redirect 303, config.basePath ? "#{req.protocol}://#{req.header 'host'}/"
 
 # throw 404 on any unknown route
-app.all '*', (req, res) -> res.send 404, '404 Not Found'
+app.all '*', (req, res) -> res.status(404).send '404 Not Found'
 
 # Once the package list was successfully scanned once bind to the port
 readPackages -> app.listen config.port, config.ip

			# hash first because Woltlab Community Framework uses double salted hashes
			bcrypt.hash reqAuth.pass, auth.users[reqAuth.name].passwd, (err, hash) ->
				if err?
					res.send 500, '500 Internal Server Error'
					return
				bcrypt.compare hash, auth.users[reqAuth.name].passwd, (err, result) ->
					if err?
						res.send 500, '500 Internal Server Error'
						return
					if result
						callback reqAuth.name

	host = config.basePath ? "#{req.protocol}://#{req.header 'host'}"
	versionNumber = packageList?[req.params[0]]?.packageinformation?.version[0]
	unless versionNumber?
		res.status(404).send '404 Not Found'
		return
	res.redirect 301, "#{host}/#{req.params[0]}/#{versionNumber.toLowerCase().replace (new RegExp ' ', 'g'), '_'}"

