Let \( y = y(x) \) be the solution of the differential equation, \( (1 + y^{2}) e^{\tan x} \, dx + \cos^{2} x \, (1 + e^{2 \tan x}) \, dy = 0 \), \( y(0) = 1 \). Then \( y\!\left(\frac{\pi}{4}\right) \) is equal to:
\( \frac{2}{e^{2}} \)
\( \frac{2}{e} \)
\( \frac{1}{e} \)
\( \frac{1}{e^{2}} \)