Provide support for the State Parameter during Authentication

Add support for the State Parameter when authenticating.
login accepts the option of "state"
Created a function getState to return the state value

(Sorry about some of the whitespace nerfing. My text editor was set to kill empty lines of just spaces)