Here are a few steps that you have to follow to log out of the FB Messenger app
Open the Facebook app (not Messenger).
Tap the Menu (three lines) in the bottom right (iOS) or top right (Android).
Go to Settings & Privacy > Settings.
Tap Security and Login.
Find “Where You're Logged In.”
Tap the three dots next to your Messenger session.
Select Log Out.