changed the authorization hok patch and minor fixes