'Log in as a staff user, then return a `requests` `session` object for the logged in user.
Raises a `StudioApiLoginError` if the login fails.'

@lazy
def session(self):

    session = requests.Session()
    response = session.get((LMS_BASE_URL + '/auto_auth?superuser=true'))
    if response.ok:
        user_pattern = re.compile('Logged    in    user    {0}    \\({1}\\)    with    password    {2}    and    user_id    {3}'.format('(?P<username>\\S+)', '(?P<email>[^\\)]+)', '(?P<password>\\S+)', '(?P<user_id>\\d+)'))
        user_matches = re.match(user_pattern, response.text)
        if user_matches:
            self.user = user_matches.groupdict()
        return session
    else:
        msg = 'Could    not    log    in    to    use    ConfigModel    restful    API.        Status    code:    {0}'.format(response.status_code)
        raise ConfigModelFixtureError(msg)
