update authorise function