Assert that the login form refused the last login with a message that holds the text (the site's error banner above the form). Give such a scenario @js-off: the browser logs the refused request.
Examples
Then the login should be refused with "Authentication failed"
Then the login should be refused with "Please try again"
And the login should be refused with "Authentication failed. Please try again."
But the login should be refused with "Authentication failed"
Then the login should be refused with "try again"
Pattern
Then(/^the login should be refused with "([^"]*)"$/, …)
Part of @webship-js/plane-steps (github.com/webship/plane-steps), a step pack for Webship-js 2.0.x.