added singout condition if user is logged in