fixed a bug in auth with different base url