If you notice some suspicious activities in your Facebook account or you think someone else uses your account without your knowledge then you can easily detect when and where your account is accessed or currently active. There’s simple security setting in Facebook to make your Facebook account secure from unauthorised access which is called login notifications.
You get notified through text message or email right when someone try to login into your account from unrecognised devices. Recognised devices are the devices which you actually provide a name when you first time login after turn ON login notifications, means you’ll not receive login notifications after assign a name to your recognized device but you get notifications for all other devices.
To activate login notifications
Go to your Facebook security settings section in account settings page. Click on Login Notifications and check box Email and Text message and save changes.
You can also see a list of recognized devices which you have recognized while login notifications are ON. You can remove any device from there if no longer using it.
In the same security section you can check the active sessions if some is currently logging in to your account with the information of approximate location and device type. If you find there an unfamiliar device like if you are Windows user and your active sessions shows login device type as Mac then you end that session by clicking End Activity and it’ll logged out of that machine.
Same security feature is available for your Gmail account where you can setup two step verification login in which a verification code is send to your verified mobile number every time you or someone else trying to login from unrecognized device.