added JWT logic and attempting to establish connection with mongo