I would recommend using Google Docs for this.
In broad strokes:
If you insist on creating this feature yourself, you would need to store your user info (user ID, Password, etc) in a table in a database.
Then you'd need a second table which has the info on the PDF files (link, name, which user ID's have access to it).
When a user logs in you would run a query to authenticate them with their user ID and password from the users table, and checks at the same time which PDF files are accessible to that user.
Your login form would look something like this:
<form name="login" action="login.php" method="post">
User ID: <input type="text" name="user" /><br />
Password: <input type="text" name="pass" /><br />
<input type="submit" value="Sign In" />
</form>
Your login.php file would have something like this:
<?php
$query = mysql_query("SELECT userID, password FROM users_table WHERE userID = '$_POST['user']'");
$get_user = mysql_fetch_array($query);
if ($get_user['password_column'] == $_POST['pass']){
//user is logged in!
}
else {
//invalid username or password
}
?>
Your PDF file info table would have to have at the least the PDF file name and which users are allowed to view/download that file. Once the user is logged in you would run a query which looks something like this (assuming you have the user name stored in the PHP variable $user:
SELECT * FROM pdf_table WHERE MATCH(allowed_users_column) AGAINST ('$user')
So to make a long story short: it is very possible to do this. The code I've posted is rudimentary and basic at best, but it should give you a general idea of how to accomplish this if you cannot use a service like Google Docs for this.