re-worked login with new ApiRequest object

And will use this new workflow for the rest of the project. I need to go
back to other requests (i.e., upload video request) and port them over
into this new way. Thanks to Wade Christie for implementing the
ApiRequest and ApiException objects.