public User add(User user) throws ServerException, SQLException  {
	  PreparedStatement stmt = null;
	  Statement keyStmt = null;
	  ResultSet keyRS = null;
	  User returnUser = null;
	  try {
	    String sql = "INSERT INTO users (username, password, name_first, name_last, email, indexed_records) VALUES(?, ?, ?, ?, ?, ?)";
	    stmt = db.getConnection().prepareStatement(sql);
	    stmt.setString(1, user.getUsername());
	    stmt.setString(2, user.getPassword());
	    stmt.setString(3, user.getFirstName());
	    stmt.setString(4, user.getLastName());
	    stmt.setString(5, user.getEmail());
	    stmt.setInt(6, user.getIndexedRecords());
	    if (stmt.executeUpdate() == 1) {
	    	keyStmt = db.getConnection().createStatement();
	    	keyRS = keyStmt.executeQuery("SELECT last_insert_rowid()");
	    	keyRS.next();
	    	int userId = keyRS.getInt(1);
	    	returnUser = new User(userId, user.getUsername(), user.getPassword(), user.getFirstName(), user.getLastName(), user.getEmail(), user.getIndexedRecords());
	    } else {
	      System.out.println("Insert user failed");
	    }
	  } catch (SQLException e) {
	    //e.printStackTrace();
	  } finally {
	    if (stmt != null) stmt.close();
	    if (keyRS != null) keyRS.close();
	    if (keyStmt != null) keyStmt.close();
	  }
	  return returnUser;
  }