Let the line through point $E$ and orthogonal to $CA$ intersect $CA$ at point $L$. Let the line through point $F$ and orthogonal to $BC$ intersect $BC$ at point $N$. Since $AB$ is orthogonal to $CK$ and $CE$ is the angle bisector of angle $\angle \, ACK$,
$$LE = KE$$

Let $\angle \, BAC = \alpha = \angle \, CAK$. Then $\angle \, ACK = 90^{\circ} - \alpha$ and $\angle \, BCK = \alpha$ which means that $$\angle \, ACE = \frac{1}{2} \, \angle \, ACK = 45^{\circ} - \frac{\alpha}{2}$$ since $CE$ is the angle bisector of angle $\angle \, ACK$. Consequently $$\angle \, BEC = \angle \, ACE + \angle \, CAE = 45^{\circ} - \frac{\alpha}{2} + \alpha = 45^{\circ} + \frac{\alpha}{2}$$ Since $BF$ is parallel to $CE$
$$\angle \, EBF = \angle \, BEC = 45^{\circ} + \frac{\alpha}{2}$$ However, $$\angle \, EBN = 180^{\circ} - \angle \, CBA = 180^{\circ} - (90^{\circ} - \angle \, BAC) = 90^{\circ} + \alpha$$ and so
$$\angle \, NBF = \angle \, EBN - \angle \, EBF = 90^{\circ} + \alpha - 45^{\circ} - \frac{\alpha}{2} = 45^{\circ} + \frac{\alpha}{2} = \angle \, EBF$$ which means that $BF$ is the angle bisector of $\angle \, EBN$ and thus
$$NF = KF$$ Since triangles $AEL$ and $CFN$ are right and $$\angle \, EAL = \angle \, BAC = \alpha = \angle \, BCK = \angle \, FCN$$ the two triangles $AEL$ and $CFN$ are similar and thus
$$\frac{LE}{EA} = \frac{NF}{FC}$$ Take point $P$ on line $CF$ so that $F$ is the midpoint of $CP$. Then $FC = FP$. Therefore,
$$\frac{KE}{EA} = \frac{LE}{EA} = \frac{NF}{FC} = \frac{KF}{FP}$$
which by the Thales' intercept theorem implies that $EF$ is parallel to $AP$. Since $M$ is the intersection point of $EF$ with $CA$, the segment $FM$ is parallel to $AP$ and $F$ is the midpoint of $CP$ by construction, so $M$ is the midpoint of $AC$.
Edit. To use Menelaus' theorem, simply get to the point where we have proven that
$$\frac{LE}{EA} = \frac{NF}{CF}$$ as explained above. After that use the fact that $LE = KE$ and $NF = FK$ and apply Menelaus' theorem as follows
$$1 = \frac{CF}{FK} \cdot \frac{KE}{EA} \cdot \frac{AM}{MC} =
\frac{CF}{NF} \cdot \frac{LE}{EA} \cdot \frac{AM}{MC}$$ However $$\frac{LE}{EA} = \frac{NF}{CF}$$ is equivalent to $$ \frac{CF}{NF} \cdot \frac{LE}{EA} = 1$$ which reduces the identity
$$1 =
\frac{CF}{NF} \cdot \frac{LE}{EA} \cdot \frac{AM}{MC}$$ to
$$1 =
\frac{AM}{MC}$$ which is possible if and only if $AM = MC$.