'Attempt to log in using \'email\' and \'password\'.'

def login(self, email, password, expect_success=True):

    self.fill_field('input#email', email)
    self.fill_field('input#password', password)
    self.q(css='button#submit').first.click()
    if expect_success:
        EmptyPromise((lambda : ('signin' not in self.browser.current_url)), 'redirected    from    the    login    page').fulfill()
