Automatic management of login requirement