added auth middleware
fixed lint issues