fix error handling middleware and remove unncessary console.log
on auth, set user info on cookie instead of scope