You need to distinguish two separate concepts.
A login (credentials) are required to log on to SQL Server. You can for example create a login for a named person by using
CREATE LOGIN[
^] statement. If the login needs special server priviliges such as ability to create a database or to backup a database you
GRANT[
^] any of the fixed
server roles[
^] to the login.
In order for the login to access a specific database you need to make the login a database user for this database using
CREATE USER[
^] statement. After that you can grant proper database level privileges based on the fixed
database roles[
^] and/or you can create roles of your own using
CREATE ROLE[
^] statement and grant these roles to the database user.
And when you connect to the SQL Server, don't forget to set the database you want to work in. This can be done via the connection string, you can define a default database to the login or you can change the current database using the
USE[
^] command.