Issue Fixing

This pull request includes a couple of fixes for the following:

* A error caused by a missing exception class
* The base url was not being correctly generated for private apps