Login history for Users

How can we retrieve login history for users?
What is the way to identity the user is logged in using which Oauth application through API.
We can see those on dashboard, what is the API to retrieve this information?