Added JavaScript REST client and examples for session and token authentication