Do this step by step.
Create a database.
a. Create the necessary tables and populate all the values belonging to that table(Library details).
b. Create two tables, one for Registering the username and password and other for storing the users details and name it UsertableDetails..(Its up to you how to design the database)
This is the link to registration page.
http://www.daniweb.com/tutorials/tutorial23605.html
and this is the link to authentication page
http://www.daniweb.com/techtalkforums/thread19303.html
c.Now what ever values you want to retrieve for a particular user, retrieve it from UsertableDetails.
You should be fine.