condition for loged in