change the implementation of auth, begin to integrate the spray client