how to disable chat for non login users

is there a way so that when a user that is just visiting wouldn't be able to see the chat box? We have a professional chatbox and want to use that and use this chatbox for members to communicate to eachother.