public int storeAccount(Account acc) {
		int result = 0;
		ResultSet rs = null;
		PreparedStatement statement = null;
		
		try {
			statement = conn.prepareStatement("insert into Accounts (Username, Password, Manager) values (?,?,?)", Statement.RETURN_GENERATED_KEYS);
			MessageDigest digest = MessageDigest.getInstance("SHA-256");
			byte[] hash = digest.digest(acc.getPassword().getBytes("UTF-8"));
			
			statement.setString(1, acc.getUsername());
			statement.setString(2, toHexString(hash));
			statement.setBoolean(3, acc.getManager());
			statement.executeUpdate();
			
			rs = statement.getGeneratedKeys();
			rs.next();
			
			result = rs.getInt(1);
		} catch(SQLException e){
			e.printStackTrace();
		} catch(NoSuchAlgorithmException e){
			e.printStackTrace();
		} catch(UnsupportedEncodingException e){
			e.printStackTrace();
		} finally {
			try { if (rs != null) rs.close(); } catch (Exception e) {}
			try { if (statement != null) statement.close(); } catch (Exception e) {}
		}
		
		return result;
	}