adding more passport configuration for users, added a middleware for authentication