This article explains how to log out of Facebook chat on a computer so that no one knows that you are online.
Steps

Step 1. Log in to
Your News Feed will appear.
If you are prompted to log in, type your username and password in the fields at the top right, then click "Log in"

Step 2. Click on the gear button at the bottom right of the chat panel
A drop-down menu will appear.

Step 3. Click Deactivate Chat

Step 4. Select Turn off chat for all contacts
Choose this option if you don't want to appear online to any of your contacts.
- To allow specific people to see you online, select "Turn off chat for all contacts except…" and enter their names.
- If you want to appear disconnected to certain people, select "Turn off chat for some contacts only …". This option allows you to type the names of people you don't want to appear online.

Step 5. Click OK
The changes will be applied immediately.