MDL-46891 behat: Optimised login step and context helper