complete refactor of post test with authentication