The form and portal extensions have built-in login feature. Depending on how you use these extensions, the login can mean anything. You can customize the error message when the record does not exist. Go to:
Form or Portal Settings
If record does not exist: must be set to Show an error message
Fill up Custom Error Message If Record Does Not Exist (Optional)