How to turn linear regression into logistical regression
You should use softmax to convert your output in probabilities. For only two classes, you have the formula $P(x  \in class 1) = \frac{\exp(y_{\text{class1}})}{\exp(y_{\text{class1}}) + \exp(y_{\text{class2}})}$. It mentioned in your article.