Using JSON Web Tokens for authentication