fixed authentication problems with proxy rewrites