Logging out of your account is easy on all devices.
On iPhone:
Go to your Profile by tapping the bottom-right icon.
Tap the Settings gear in the top-right corner.
Scroll down and select Log Out.
On Desktop Site:
Go to your Profile in the top-right corner of the page.
Click Log Out.
This will log you out of the app. If you need to log back in, simply enter your credentials again.