For the agent log in portion, you could likely do it via a Bookmarklet, it was posted here in the community a while back but basically think of it as a browser bookmark that has all of the agent information saved. I'm not finding it at the moment, but if you don't find it I can look again.
For the log out, would you really want to do that, though? Suppose agent on long call or training or other reasons, forced log out may create more problems than it solves for you. Just my $.02.