Add password authentication logic