Setting up login/register pages in PHP, working with hashed password, handling errors and redirects, session data, and logout