'For those who thought NATO's time had passed, they got a rude awakening when Putin invaded Ukraine,' says US president