<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def get_upload_token(mail, pwd):
    '''
    Get upload token
    '''
    try:
        params = urllib.urlencode({"email": mail, "password": pwd})
        response = urllib.urlopen(LOGIN_URL, params)
    except:
        return None
    resp = json.loads(response.read())
    if not resp or 'token' not in resp:
        return None
    return resp['token']