converted test file for authentication rpc from Coffee to JS