Authentication in Nodejs using JSON web tokens (JWT)