Make use of the local browser selectable.

- Use a struct to hold configuration/options
- Put command line parsing into its own function
- Add a flag to disable opening the auth URL in a browser