Make auth api endpoint proper API endpoint; add a CLI client for testing