Fix invalid login issue