Have users to be logged in to use chat?
No it's not needed. This is up to you how to set chat access and use.
JChatSocial can work both with logged in users and guest users. This is particularly useful for example when used as a live support or marketing tool, allowing chat admins to talk with every visitors that surf your site.
If you use JChatSocial on a social platform probably you would prefer disable the guest feature and leave chat access only for logged in users.
Moreover JChatSocial allows you to specify access level for chat permissions. In this way you can decide what specific Joomla groups can have access to chat.
This component is extremely flexible, it can be configured in different ways to cover all possible use cases, from a live support tool to a social platform chat between friends. Read carefully detailed documentation for further examples and explanations.