fix strict errors, broken tests and add test for token auth