Refactored code, ensured only signed in users could post