custom middleware to add user