Fix js error during login