Within Teamwork Chat, you can log out by simply navigating to the bottom left pane and selecting the cog icon to the right of your name.

In the profile settings area, you will see a logout option to the bottom left.

For more information, see: Logging in to the Teamwork Chat app