Changed the failure URL, so that we pass the intended URL as a parameter

Fixed a few problems with the when we authorise using the PathStart parameter