Changing from basic auth to customized auth