Fix crash when login results in error.

:four_leaf_clover: