public boolean checkPassword(String username, byte[] passwordHash) {
		try {
			// hash + salt = password
			storage.selectDb("passwords");
			Object obj = storage.readObject(username.toLowerCase());
			Password password = (Password) obj;
			if (password == null) {
				// User doesn't exist
				return false;
			}
			byte[] p = rehash(passwordHash, password.getSalt());

			return Arrays.equals(p, password.getPassword());
		} catch (IOException ex) {
			Alerter.getHandler().severe("Authetication", "Unable to check password. " + ex.getMessage());
			return false;
		}
	}