Rename authentication function and return connection