added support for the clientstate parameter
code cleanup
started migrating all the credentials logic to a specific class