You'll need a little bit of code that can read out the same information you get by looking at the list of users in the admin interface.
Logout is a little more difficult. I quite simply don't log out. I close my browser, or even just lock my machine and wander off. There's no log-off event. So it's a lot harder to track and I'm not even sure JIRA stores it at all!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.