Added tests for custom authentication mechanism