fix isLoggedInPolicy authenticated user check
updated version and tests