For those of you wondering as to WHY this functionality is needed – here is a scenario: a web site with disabled user registrations, where accounts given away manually. Some content/functionality is restricted only to logged in users.
Visitors are mostly familiar with the look and feel of the web site that they are browsing. Throwing them somewhere else for login/incorrect password message is very disorienting.