check for existence of request.query and request.body before deleting to...

Attempting to delete token on request.query.token and request.body.token causes error if request does not have either a body or a query. Make sure request.query and request.body exist before attempting deletion.