You might want to consider something like one of these
https://github.com/ircmaxell/password_compat
https://github.com/hautelook/phpass
Which do a reasonable job of one way password encryption and then validation.
You'll likely need sessions too - and you tweak the session hash if you want to with these options
http://php.net/manual/en/session.configuration.php
Tom