def is_authenticate(message=None):
    """
    Checks that message has authenticate data.
    Return (username, password) or None.
    """
    try:
        if message['action'] == 'authenticate':
            return message['user']['account_name'], message['user']['password']
    except Exception:
        pass
    return None
