I followed the instructions given in sample-nodejs-express-4 and also went through following bug Error 400 bad request. I am still getting the issue reported in the bug.
I have put the login-redirect-url as localhost:8080/ itself and added localhost:8080 in the trusted origins.
Thanks,
Prasad