'Toggle between the login and registration forms.'

def toggle_form(self):

    old_form = self.current_form
    if (old_form == 'login'):
        self.q(css=".form-toggle[data-type='register']").click()
    else:
        self.q(css=".form-toggle[data-type='login']").click()
    EmptyPromise((lambda : (self.current_form != old_form)), 'Finish    toggling    to    the    other    form').fulfill()
