Fixed the functionality of login requirement check