Changed to use default connection and allow persistent cookie to be set.