y_fit <- predict(L,newdata=data.frame(x=x),type="response")
Gives the correct output. Without this flag, the model defaults to a linear output.