adds middleware for authenticating users based on auth_token cookie
Refactors routes into route file