If you are inserting values from registration page to database.
then at the time of login verify these values if found then login.
How it can be done see
Simple login page
SELECT * FROM registrationtab WHERE username=@username AND password=@password
this query using stored procedure.You can simply use this in your code without stored proc.