added hash existence check for password login