Added tests for authentication, ref #123