def login(self, username, password):
response = self.session.post(<EOL>os.path.join(self.identity_url, '<STR_LIT>'),<EOL>cert=self.cert_file,<EOL>data=urllib.urlencode({<EOL>'<STR_LIT:username>': username,<EOL>'<STR_LIT:password>': password,<EOL>}),<EOL>headers={<EOL>'<STR_LIT>': self.app_key,<EOL>'<STR_LIT:Content-Type>': '<STR_LIT>',<EOL>},<EOL>timeout=self.timeout,<EOL>)<EOL>utils.check_status_code(response, [httplib.OK])<EOL>data = response.json()<EOL>if data.get('<STR_LIT>') != '<STR_LIT>':<EOL><INDENT>raise exceptions.LoginError(response, data)<EOL><DEDENT>self.session_token = data['<STR_LIT>']<EOL>
Log in to Betfair. Sets `session_token` if successful.

        :param str username: Username
        :param str password: Password
        :raises: BetfairLoginError