src/liteAuth.php
public function login($user, $pass)
    {
        if( $id = $this->authUser($user, $pass))
        {
            $this->user = new User($this, $id);
            $newtoken = bin2hex(random_bytes(16));
            $this->db->insert($this->prefix.'authtokens', ['user_id'=>$id, 'token'=>$newtoken]);
            $_SESSION['liteauth']['token'] = $newtoken;
            $this->authtoken = $newtoken;
			return True;
        }
        else
            return False;
    }
public function login($user, $pass)
    {
        if( $id = $this->authUser($user, $pass))
        {
            $this->user = new User($this, $id);
            $newtoken = bin2hex(random_bytes(16));
            $this->db->insert($this->prefix.'authtokens', ['user_id'=>$id, 'token'=>$newtoken]);
            $_SESSION['liteauth']['token'] = $newtoken;
            $this->authtoken = $newtoken;
			return True;
        }
        else
            return False;
    }
Checks the password against the given user, and if it authenticates successfully,
populates the $this->user property with an instance of the User class for that user.