added CLI functionality so that curl can be used for manual testing and review
updated CLI script so it can be run inside a curl command with backticks; it just outputs the session cookie, nothing else