def jwt_response_payload_handler(token, user=None, request=None):
    """
    Returns the response data for both the login and refresh views.
    Override to return a custom response such as including the
    serialized representation of the User.
    """
    return {'token': token, 'user': {'id': user.pk, 'uuid': str(user.uuid)}}
