Let's say that there is hypothetically a member or user who

Let's say that there is hypothetically a member or user who is trolling a site and I have the IP address to ban the person at the next login. How can I force the logout to achieve this?