@Override
	public void handle() {
		try {
			if (this.requestThread.isAuthenticated()) {
				D.out(
						"Login requested from " + this.requestThread.getRemoteIP()
								+ " -> granted (already logged in)");
				this.requestThread.close(302, "OK", "/");
				return;

			}

			String possibleKey = this.requestThread.path.substring("/onetime/"
					.length());

			if (OneTimeManager.isRegistered(possibleKey)) {
				// System.err.println("isRegistered: true");
				LoginRequest lr = new LoginRequest();
				lr.setRequestThread(this.requestThread);
				// lr.handle();
				lr.sendCookie();
				OneTimeManager.unregister(possibleKey);

				D.out(
						"Login requested from " + this.requestThread.getRemoteIP()
								+ " -> granted (correct one-time key)");

			} else {
				try {
					this.requestThread.close(403, "No key");
				} catch (Exception e) {
				}
			}
		} catch (Exception e) {
			System.err.println("Couldn't process OneTimeRequest: "
					+ (e.getMessage()));
			e.printStackTrace();

			try {

				this.requestThread.close(500, "Server error");
			} catch (Exception e1) {
			}
		}
	}