fix auth problem & add new configurable way for oauth