Added exception class and cleaned up errors

Changed the way the library works too, it now stores the ticket
internally and future requests will use that ticket.