Fixed login checks