President urges nation to unite, defeat forces of extremism