sys schema is your friend for these kind of queries. Specifically
sys.sysusers will give you the list of all Users of the current database.
You can also get a list of all server Logins using
In SQL Server, a server Login is first created, and then mapped to the databases that Login has access to. Each database a Login is mapped to has a User created within that database for that Login.