fixed check for identified session always returning true