Adds better login detection