def unpack_unpw(unpw):
    """
        unpw = 'admin:secret'
        unpack_unpw(unpw)
        unpw = 'admin'
        unpack_unpw(unpw)
    """
    tmp = unpw.split(':')
    username = tmp[0]
    try:
        password = tmp[1]
    except:
        password = ''
    else:
        password = tmp[1]
    d = {'username': username, 'password': password}
    return d
