Behat and custom login pages
You can test login form in this way:

When I visit 'user/login'
And I fill in "username" for "name"
And I fill in "userpass" for "pass"
And I press the "Log in" button
Then I should see the text "some text"