Fix redundant login attempts