The answer above is correct. For reference, here's some elaborated working R code to compute it. I have take the liberty of adding an intercept, because you probably do want one of those.
## make some data
set.seed(1234)
N <- 2000
x1 <- rnorm(N)
x2 <- rnorm(N)
## create linear predictor
lpred <- 0.5 + 0.5 * x1 + 0.25 * x2
## apply inverse link function
ey <- 1/(1 + exp(-lpred))
## sample some dependent variable
y <- rbinom(N, prob=ey, size=rep(1,N))
dat <- matrix(c(x1, x2, y), nrow=N, ncol=3)
colnames(dat) <- c('x1', 'x2', 'y')
Now construct a log likelihood function to maximise, here using dbinom
because it's there, and summing the results
## the log likelihood function
log.like <- function(beta, dat){
lpred <- beta[1] + dat[,'x1'] * beta[2] + dat[,'x2'] * beta[2]**2
ey <- 1/(1 + exp(-lpred))
sum(dbinom(dat[,'y'], prob=ey, size=rep(1,nrow(dat)), log=TRUE))
}
and fit the model by maximum likelihood. I haven't bothered to offer a gradient or choose an optimisation method, but you might want to do both.
## fit
res <- optim(par=c(1,1), ## starting values
fn=log.like,
control=list(fnscale=-1), ## maximise not minimise
hessian=TRUE, ## for SEs
dat=dat)
Now have a look at the results. The ML parameter estimates and asymptotic SEs are:
## results
data.frame(coef=res$par,
SE=sqrt(diag(solve(-res$hessian))))
which should be
## coef SE
## 1 0.4731680 0.04828779
## 2 0.5799311 0.03363505
or there's a bug (which is always possible).
The usual caveats about Hessian-derived standard errors apply.