Wrote tests for authenticated and unauthenticated user