public static synchronized ValidatedHandshakeResponse validate(HandshakeRequestEvent handshakeRequestEvent, Channel c) {
		ValidatedHandshakeResponse vhr = null;
		
		short errCode = matchVersionAndKey(handshakeRequestEvent.getVersion(),
										   handshakeRequestEvent.getAccessKey());
		
		if(errCode != ValidatedHandshakeResponse.NO_ERROR) {
			return handshakeFailedMessage(errCode);
		}
		
		DBQueryUserResult dbQuery = 
				Database.getUser(handshakeRequestEvent.getUsername(), 
								 handshakeRequestEvent.getPassword());
		
		if(dbQuery == null) {
			return handshakeFailedMessage(ValidatedHandshakeResponse.CAUSE_USERNAME_PASSWORD_NOMATCH);
		} else if(dbQuery.getIsBanned()) {
			return handshakeFailedMessage(ValidatedHandshakeResponse.CAUSE_USER_BANNED);
		}
		
		// TODO: Add the user to the Sessions.
		Sessions.addSession(new Session(dbQuery.getAsUser(), c));
		
		vhr = new ValidatedHandshakeResponse(dbQuery.getId());
		
		return vhr;
	}