404 error on login with widget-SPA app

I am using a simple JS page to render the sign in widget and have created a corresponding SPA app in my okta org. But when i click login , in the widget , i get a 404 from okta. The following URL is shown:

https://dev-836251-admin.oktapreview.com/error/404?fromURI=%2Foauth2%2Fdefault%2Fv1%2Fauthorize%3Fclient_id%3D0oaftmw64sy3AslJH0h7%26redirect_uri%3Dhttp%3A%2F%2Flocalhost%3A8001%2FSABWeb%2Ftraining%2Flogin%2F%26response_type%3Did_token%20token%26response_mode%3Dfragment%26state%3DbyOB1LQ0ZQR6FZkepKTl14E2FGeAb2I0HnHMKhOd5DqrlJVlnqQhz1Afihx7a4u9%26nonce%3D8CUPQkN4o0n9goZcZDkHBUERzLjwpPFsh4PXCuHHougH8tHgZsbfKfPdY9iqFArk%26display%3Dpage%26sessionToken%3D20111oLYHuRylZ2imnWEw1xEiQkGnOWhstKw5UiqHs4etbYrcy89eJE%26scope%3Dopenid%20email