added logic to handle location for non authenticated users