fixed token handling in server config