nicer login detection

Thanks Diego. :D