release db before returning from authenticate