i thinnk you only neeed this pdo function. and basic session.
like try and catch for pdo connection
$handle = new PDO("mysql:host=localhost;dbname=dbname","user","pass");
then apply try and catch for specific error in pdo attribute modification.
after the connection apply basic login form with php query after sanitizing the user and pass variables.
and query if the user and pass equals to dbname registered account.
then count the query for numrows then equall to something then give a session and
you are logging in.