Make sure nobody is logged in, to the site or to the administrator: clear the cookies and the web storage of the browser. When the scenario is on the administrator, the login form is loaded again and asserted; on any other page the page is reloaded.
Examples
Given I am not logged in
Given we are not logged in
And not logged in
Given I am not logged in
And we are not logged in
Pattern
Given(/^(I am |we are )*not logged in$/, …)
Part of @webship-js/joomla-steps (github.com/webship/joomla-steps), a step pack for Webship-js 2.0.x.