add helper for authorization, and clean ifs
add helper for authorization, and clean ifs

iTerminate/traveler,iTerminate/traveler,dongliu/traveler,dongliu/traveler,dongliu/traveler,iTerminate/traveler,iTerminate/traveler