Bug fixes

it should be working again, fixed the library and added code to
auto-determine the callback URL