In 1999, Yang and Shieh proposed a timestamp-based password authentication scheme with smart cards. However, Chan and Cheng showed that it was insecure because the scheme was vulnerable to the forged login attack. In this paper, we propose a modified Yang-Shieh scheme to enhance security. Our modification can help withstand the forged login attack and also provide a mutual authentication method to prevent the forged server attack.