Added debug for expired token case
Updated send_status() and other minor changes