if (!accountManagement.verifyAccountExists(localUser)) {
accountManagement.addUser(localUser, password);
}
// S2S endpoint
TCPEndpoint s2sEndpoint = new TCPEndpoint();
s2sEndpoint.setPort(5269);
server.addEndpoint(s2sEndpoint);
// C2S endpoint
server.addEndpoint(new TCPEndpoint());
server.setStorageProviderRegistry(providerRegistry);
server.setTLSCertificateInfo(new File(keystorePath), keystorePassword);
server.start();