Auth check middleware for routes + error handling for user login