Fixed signed auth token function