Middleware gives user the cookie if they are in the db